package ru.braim.weather_app.repositories;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import ru.braim.weather_app.models.Region;

import java.util.List;

@Repository
public interface RegionRepository extends JpaRepository<Region, Long> {
    Region getRegionByLatitude1AndLongitude1(double latitude, double longitude);
    Region getRegionByLatitude2AndLongitude2(double latitude, double longitude);
    List<Region> getRegionsByParentRegion(String parentRegion);
    Region getRegionById(Long id);
}
